package gui;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;

import javax.swing.JPanel;

public class TransparentPanel extends JPanel
{
	public TransparentPanel()
	{
		setLayout(null);
		setOpaque(false);
	}

	@Override
	public void paintComponent(Graphics g)
	{
		g.setColor(new Color(0, 0, 0, 170)); // red, green, blue, alpha
		Rectangle r = g.getClipBounds();
		g.fillRect(r.x, r.y, r.width, r.height);
		super.paintComponent(g);
	}

}
